package saiboten.actions;

import java.util.List;

import saiboten.ChannelAction;

public class GoogleAction implements ChannelAction {

	@Override
	public List<String> action(List<String> result, String channel,
			String sender, String message) {
		if (message.startsWith("!google")) {
			try {
				result.add("http://www.google.com/search?&rls=nb&q="
						+ message.split(" ")[1] + "&ie=utf-8&oe=utf-8");
			} catch (Exception u) {
				result.add("No link given.");
			}
		}
		return result;
	}
	
}
